<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>在线OJ-题目列表</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
    <style>
        /* 全局样式重置 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        html, body {
            height: 100%;
            font-family: 'Roboto', sans-serif;
            background-color: #f4f4f9;
            color: #333;
        }

        .container {
            display: flex;
            flex-direction: column;
            min-height: 100%;
            background-image: url('https://source.unsplash.com/1600x900/?coding,programming'); /* 添加背景图片 */
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        .navbar {
            background-color: rgba(44, 62, 80, 0.9); /* 半透明背景 */
            color: white;
            padding: 10px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .navbar a {
            color: white;
            text-decoration: none;
            padding: 10px 15px;
            font-size: 16px;
            transition: background-color 0.3s ease;
        }

        .navbar a:hover {
            background-color: #34495e;
            border-radius: 4px;
        }

        .navbar .login {
            margin-left: auto;
        }

        .question_list {
            flex: 1;
            padding: 20px;
            max-width: 800px;
            margin: 0 auto;
            text-align: center;
            background-color: rgba(255, 255, 255, 0.9); /* 半透明背景 */
            border-radius: 10px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            margin-top: 20px;
        }

        .question_list h1 {
            color: #27ae60;
            margin-bottom: 20px;
            font-size: 2.5em;
        }

        .question_list table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 20px;
            background-color: white;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .question_list th, .question_list td {
            padding: 15px;
            text-align: center;
            border-bottom: 1px solid #ddd;
        }

        .question_list th {
            background-color: #27ae60;
            color: white;
            font-weight: 500;
        }

        .question_list td a {
            color: #2980b9;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .question_list td a:hover {
            color: #1c5980;
            text-decoration: underline;
        }

        .footer {
            background-color: rgba(44, 62, 80, 0.9); /* 半透明背景 */
            color: white;
            text-align: center;
            padding: 10px 0;
            margin-top: auto;
        }

        .footer h4 {
            margin: 0;
            font-size: 1em;
            font-weight: normal;
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 导航栏 -->
        <div class="navbar">
            <div>
                <a href="/">首页</a>
                <a href="/all_questions">题库</a>
                <!-- <a href="#">竞赛</a>
                <a href="#">讨论</a>
                <a href="#">求职</a> -->
            </div>
            <!-- <a class="login" href="#">登录</a> -->
        </div>

        <!-- 题目列表 -->
        <div class="question_list">
            <h1>OnlineJudge 题目列表</h1>
            <table>
                <thead>
                    <tr>
                        <th>题号</th>
                        <th>标题</th>
                        <th>难度</th>
                    </tr>
                </thead>
                <tbody>
                    {{#question_list}}
                    <tr>
                        <td>{{number}}</td>
                        <td><a href="/question/{{number}}">{{title}}</a></td>
                        <td>{{star}}</td>
                    </tr>
                    {{/question_list}}
                </tbody>
            </table>
        </div>

        <!-- 页脚 -->
        <div class="footer">
            <h4>Online Judge</h4>
        </div>
    </div>
</body>

</html>